//
//  sampleViewController.m
//  sample
//
//  Created by a on 10-11-9.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "sampleViewController.h"

@implementation sampleViewController
- (void)viewDidLoad {
    [super viewDidLoad];
}
-(IBAction)show:(id)sender{
	 secondview=[[second alloc] initWithNibName:nil bundle:nil];
	[self.view addSubview:secondview.view];
	NSLog(@"second");
	CATransition *animation = [CATransition animation];
    animation.delegate = self;
    animation.duration = 1.25f;
    animation.timingFunction = UIViewAnimationCurveEaseInOut;
	animation.fillMode = kCAFillModeForwards;
	animation.type = kCATransitionPush;
	animation.subtype = kCATransitionFromLeft;
	[self.view.layer addAnimation:animation forKey:@"animation"];
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return (interfaceOrientation==UIInterfaceOrientationLandscapeRight);
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}
- (void)viewDidUnload {
}
- (void)dealloc {
	[secondview release]; 
    [super dealloc];
}

@end
